package com.shangxian.giveithome.code;

import lombok.Getter;

@Getter
public enum CommentCode implements Code {
    UPLOAD_NOT_NULL(false, 26002, "发布评论不能为空"),
    UPLOAD_ERROR(false, 26001, "发布评论失败"),
    INSERT_ERROR(false, 26004, "评论文章的id不能为空"),
    DELETE_ERROR(false,26003,"删除评论失败");

    private boolean success;

    private Integer code;

    private String message;

    CommentCode(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
